package com.cunshe.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 产品图片
 * @author xiao
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ProductImageInsertVO implements Serializable {


    /**
     * 产品ID
     */
    @ApiModelProperty(value = "产品ID")
    @NotNull(message = "[productId]不能为空")
    private Long productId;

    /**
     * 图片地址
     */
    @ApiModelProperty(value = "图片地址")
    @NotBlank(message = "[url]不能为空")
    @Size(max = 255, message = "${validatedValue}长度不能大于{max}")
    private String url;

    private static final long serialVersionUID = 1L;
}